package com.lam.mall.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.Null;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.components.dict.annotation.Dict;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.validate.annotation.DictValid;
import com.lam.common.validate.group.Add;

/**
 * 订单项对象 mall_order_item
 * 
 * @author admin
 * @date 2023-04-25
 */
@DictCheck
@TableName("mall_order_item")
public class OrderItem implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="orderItemId必须为空")
    @TableId(type = IdType.ASSIGN_ID)
    private String orderItemId;
    
    /** 店铺id */
    private String shopId;

    /** 用户Id */
    private String userId;

    /** 订单号 */
    private String orderNumber;

    /** 产品ID */
    private String prodId;

    /** 产品SkuID */
    private String skuId;

    /** 产品个数 */
    private Integer prodCount;

    /** 产品名称 */
    private String prodName;

    /** sku名称 */
    private String skuName;

    /** 产品主图片 */
    private String pic;

    /** 产品单价 */
    private BigDecimal price;

    /** 总金额 */
    private BigDecimal totalAmt;

    /** 下单时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 评论状态 (0-未评价  1-已评价) */
    @DictValid(message = "无效的评论状态 ")
    @Dict(dictCode = "comm_status")
    private Integer commStatus;

    /** 加入购物车时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    private Date basketDate;

    /** 推广员卡号 */
    private String distributionNo;

    public void setOrderItemId(String orderItemId) {
        this.orderItemId = orderItemId;
    }

    public String getOrderItemId() {
        return orderItemId;
    } 

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getShopId() {
        return shopId;
    }    
    
    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }    
    
    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() {
        return orderNumber;
    }    
    
    public void setProdId(String prodId) {
        this.prodId = prodId;
    }

    public String getProdId() {
        return prodId;
    }    
    
    public void setSkuId(String skuId) {
        this.skuId = skuId;
    }

    public String getSkuId() {
        return skuId;
    }    
    
    public void setProdCount(Integer prodCount) {
        this.prodCount = prodCount;
    }

    public Integer getProdCount() {
        return prodCount;
    }    
    
    public void setProdName(String prodName) {
        this.prodName = prodName;
    }

    public String getProdName() {
        return prodName;
    }    
    
    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getSkuName() {
        return skuName;
    }    
    
    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getPic() {
        return pic;
    }    
    
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }    
    
    public void setTotalAmt(BigDecimal totalAmt) {
        this.totalAmt = totalAmt;
    }

    public BigDecimal getTotalAmt() {
        return totalAmt;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setCommStatus(Integer commStatus) {
        this.commStatus = commStatus;
    }

    public Integer getCommStatus() {
        return commStatus;
    }    
    
    public void setBasketDate(Date basketDate) {
        this.basketDate = basketDate;
    }

    public Date getBasketDate() {
        return basketDate;
    }    
    
    public void setDistributionNo(String distributionNo) {
        this.distributionNo = distributionNo;
    }

    public String getDistributionNo() {
        return distributionNo;
    }    
    

}
